home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
126-150
/
scopedisk148
/
powerplatform
/
rexx
/
extract.app
< prev
next >
Wrap
Text File
|
1995-03-19
|
3KB
|
54 lines
/************************************************************************/
/* Extract */
/* ======= */
/* */
/* This ARexx EXEC will extarct all files from an archive file. The */
/* archive can be constructed with arc, zoo or lharc. The filetype */
/* will be used to determine the archive format used. */
/* */
/* This EXEC is designed to be used with APB, the Amiga Power Bench. */
/* */
/* ==> MCW 01/27/90 <== */
/************************************************************************/
trace off /* Disable ARexx tracing */
parse upper arg fname /* Get file name */
if fname = '' then do /* No filename passed? */
'Message No filename Specified.' /* Send message back to APB */
'Beep' /* Sound the alarm */
end
ftype = substr(fname, lastpos(".", fname) +1)
if ftype = "ARC" then do /* Arc file? */
address command 'ARC <* e' fname /* UnArc file */
return /* Return to APB */
end
if ftype = "ZOO" then do /* Zoo file? */
address command 'ZOO <* e//' fname /* UnZoo file */
return /* Return to APB */
end
if ftype = "LZH" then do /* LhArc file? */
address command 'LHARC <* -x x' fname /* UnLhArc file */
return /* Return to APB */
end
if ftype = "ZIP" then do /* Zip file? */
address command 'UnZip <*' fname /* UnZip file */
return /* Return to APB */
end
if pos('UU', ftype) ~= 0 then do /* UUencoded file? */
address command 'UUdeCode <*' fname /* Decode file */
return /* Return to APB */
end
'Message Unrecognized filetype.' /* Not arc, zoo or lharc */
'Beep' /* Sound the alarm */
return 0 /* Return to APB */